#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 1e5 + 10;
ll a[N];

int main() {
    int n; cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    ll ans = 0, x = 0, y = 0, z = 0;
    for (int i = 1; i <= n; i++) {
        x = a[i], y = a[i], z = a[i];
        if (a[i] >= 500) x = a[i] - floor(a[i] / 10);
        if (a[i] >= 1000)  y = a[i] - 150;
        z = a[i] - floor(a[i] / 20);
        if (a[i] == 1111) z = 0;
        ans += min({ x,y,z });
    }
    cout << ans << endl;
    return 0;
}